#ifndef PIPESERVER_H_
#define PIPESERVER_H_

#include "../databaseADT/databaseADT.h"

void endCiclesPI(int signo);
void closeALLPI(void);

void sighandLCPI(int signo);
void *listenPubPI(void *parmsLC);

void *waitPckPI(void *ptr);

int mainPI(void);

void readCommandsPI(void);

void salirPI(char * param);

int addnamePI(char * name, char * priv);
void adddirPI(char * dir, char * priv, int cliID);
void removedirPI(char * dir, char * priv);
void listdirsPI(char * priv);
void closesessPI(char * priv);

void getparamsPI(char * full, char * params, char * priv);
int sndlistPI(char * priv, int fdpriv, char * serv_priv);

void rcvCommitPI(char * dir, char * priv);
int srv_commitPI(char * priv, char * serv_priv, char * path, int type);

int canCommittPI(char * msg);

int readIDPI(char * msgbuf, int * cliID );

#endif /*PIPESERVER_H_*/
